<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
  <script>
  	function uploaded(path){
		$("#img_url").attr("src",'__PUBLIC__'+path);
		$("input[name='img_url']").val(path);
	}
	function del_img(){
		if(confirm('您确定要删除图片吗?')){
			var file=$("input[name='img_url']").val();
			$.post("{:U('delImgBypath')}",{'path':file},function(data){
				$("input[name='img_url']").val('');
				$("#img_url").attr('src','');
			});
		}else{
			return false;
		}
	}
	//切换栏目方式
	function parseCateType(e){
		if($(e).val()==1){
			$('#pagesize').show();
		}else{
			$('#pagesize').hide();
		}
	}
	function after(e){
	    $(e).parent().parent().parent().parent().parent('li').after($(e).parent().parent().parent().parent().parent('li').prev());
    }
    function append(e){
	    $(e).parent().parent().parent().parent().parent('li').next().after($(e).parent().parent().parent().parent().parent('li'));
    }
	function delnews(e){
		$(e).parent().parent().parent().parent().parent().remove();
	}
	function addnews(){
		var html = $('#copyHTML').html();
		$(html).appendTo('#replyList ul');
	}
	
	
	function getExtends(e){
		var v = $('#extendsList'+$(e).val()).val();
		$('#extends').val(v);
	}
  </script>
  <style>
  	#replyList ul li{margin-top:5px; background:#eee; padding:8px; width:700px;}
	.delnews{display:block; width:30px; font-size:20px; height:30px; border-radius:15px; background:#f00; color:#fff; line-height:30px; text-align:center;}
  </style>

 <div class="h"><a href="{:U('index')}" class="btn btn-info"><i class="glyphicon glyphicon-circle-arrow-left"></i> 返回栏目列表</a>
 
 </div>
    <form class="checkoutform form-horizontal" action="{:U('insert')}" method="post">
      <div class="table_ container">
      
      

      
  
     <div class="form-group">
      <label class="col-sm-2 control-label">栏目名称</label>
      <div class="col-sm-10">
         <input class="form-control" datatype="*" value="{$info.title}" name="title" type="text" placeholder="栏目名称">
      </div>
   </div>
      

      <div class="form-group">
      <label class="col-sm-2 control-label">访问名称</label>
      <div class="col-sm-10">
         <input class="form-control" name="name" value="{$info.name}" type="text" placeholder="访问名称">
      </div>
   </div>
      
     
   
   <div class="form-group">
      <label class="col-sm-2 control-label">显示风格</label>
      <div class="col-sm-10">
         <!--<label class="checkbox-inline" onClick="showPagesBox(this);">
          <img src="<notempty name="info['page_list_header_img']">__PUBLIC__{$info.page_list_header_img}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>
          [列表头部风格]<input type="hidden" name="page_list_header_id" value="{$info.page_list_header_id}"><input type="hidden" name="page_list_header_img" value="{$info.page_list_header_img}"></label>-->
         
         
         
         
         <label class="checkbox-inline" onClick="showPagesBox(this);">
         <img src="<notempty name="info['page_list_img']">{:getThumbPath($info['page_list_img'])}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>

         [列表主体风格]<input type="hidden" name="page_list_id" value="{$info.page_list_id}">
         <input type="hidden" name="page_list_img" value="{$info.page_list_img}">
         </label>
         
         
         
          
          
          
          
          <!--<label class="checkbox-inline" onClick="showPagesBox(this);">
          <img src="<notempty name="info['page_list_footer_img']">__PUBLIC__{$info.page_list_footer_img}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>
          [列表底部风格]<input type="hidden" name="page_list_footer_id" value="{$info.page_list_footer_id}"><input type="hidden" name="page_list_footer_img" value="{$info.page_list_footer_img}"></label>-->
          
          <!--<label class="checkbox-inline" onClick="showPagesBox(this);">
          <img src="<notempty name="info['page_view_header_img']">__PUBLIC__{$info.page_view_header_img}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>
          [详情头部风格]<input type="hidden" name="page_view_header_id" value="{$info.page_view_header_id}"><input type="hidden" name="page_view_header_img" value="{$info.page_view_header_img}"></label>-->
          
          <label class="checkbox-inline" onClick="showPagesBox(this);">
           <img src="<notempty name="info['page_view_img']">{:getThumbPath($info['page_view_img'])}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>
          [详情主体风格]<input type="hidden" name="page_view_id" value="{$info.page_view_id}"><input type="hidden" name="page_view_img" value="{$info.page_view_img}"></label>
          
          
          
          
          
         <!-- <label class="checkbox-inline" onClick="showPagesBox(this);">
          <img src="<notempty name="info['page_view_footer_img']">__PUBLIC__{$info.page_view_footer_img}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>
          [详情底部风格]<input type="hidden" name="page_view_footer_id" value="{$info.page_view_footer_id}"><input type="hidden" name="page_view_footer_img" value="{$info.page_view_footer_img}"></label>-->
          
          
      </div>
   </div>
   

   
   
   
   
   
      <div class="form-group">
      <label class="col-sm-2 control-label">管理方式</label>
      <div class="col-sm-10">
         <label class="checkbox-inline"><input <eq name="info['is_list']" value="0">checked="checked"</eq> onClick="parseCateType(this);" name="is_list" type="radio" id="is_nav_10" value="0" />
          单页</label>
          <label class="checkbox-inline"><input <eq name="info['is_list']" value="1">checked="checked"</eq> onClick="parseCateType(this);" name="is_list" type="radio" id="is_nav_11" value="1" checked="checked" />
          列表</label><br>
<span <eq name="info['is_list']" value="0">style="display:none;"</eq> id="pagesize">&nbsp;&nbsp;          
          <input class="form-control" type="text" value="" name="pagesize">
          条记录之后分页(子栏目不填写将会从父级继承)<br>

 
<select onChange="getExtends(this);" class="form-control" name="module_id" id="module_id">
          <option value="">请选择管理模型</option>
          <volist name="module_list" id="vo">
            <option <if condition="$vo['id'] == $info['module_id']">selected="selected"</if> value="{$vo.id}">{$vo.title}</option>
          </volist>
        </select>
        <volist name="module_list" id="vo">
        <input type="hidden" id="extendsList{$vo.id}" value="{:base64_encode($vo['extends'])}">
        </volist>
        <input type="hidden" id="extends" name="extends" value="{:base64_encode($info['extends'])}">
        </span><br>

      </div>
   </div>
      
      <div class="form-group">
      <label class="col-sm-2 control-label">父级</label>
      <div class="col-sm-10">
         <select class="form-control" name="pid" id="pid">
          <option value="">请选择</option>
          <volist name="pid_list" id="vo">
            <option <eq name="vo['id']" value="$id">selected="selected"</eq> value="{$vo.id}">{$vo.title}</option>
            <volist name="vo['sub']" id="svo">
               <option <eq name="svo['id']" value="$id">selected="selected"</eq> value="{$svo.id}">{:getdeepstr($svo['deep'])}{$svo.title}</option>
            </volist>
          </volist>
        </select>
      </div>
   </div>
   
   <div class="form-group">
      <label class="col-sm-2 control-label">页面内容</label>
      <div class="col-sm-10">
         <html:editor id="editor" name="content" type="UEDIT" style="height:400px; width:100%;">{$info.content}</html:editor>
      </div>
   </div>
   
   <div class="form-group">
      <label class="col-sm-2 control-label">外部链接</label>
      <div class="col-sm-10">
         <input class="form-control" name="out_link" value="{$info.out_link}" type="text" id="out_link" size="50" />
      </div>
   </div>
   <div class="form-group">
      <label class="col-sm-2 control-label">页面标题</label>
      <div class="col-sm-10">
         <input class="form-control" name="page_title" type="text" id="page_title" size="50" />
      </div>
   </div>
   <div class="form-group">
      <label class="col-sm-2 control-label">页面关键字</label>
      <div class="col-sm-10">
        <input class="form-control" value="{$info.keywords}" name="keywords" type="text" id="keywords" size="50" />
      </div>
   </div>
   
   <div class="form-group">
      <label class="col-sm-2 control-label">页面描述</label>
      <div class="col-sm-10">
         <textarea class="form-control" name="description" class="" cols="50" rows="6" id="description">{$info.description}</textarea>
      </div>
   </div>
   
      
      
      
        
      </div><div class="pages"><button type="submit" class="btn btn-success">保存</button></div>
    </form>
  </div>
  <div class="clear"></div>
</div>

</body></html>